﻿namespace LeadMaster.Models
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.ComponentModel.DataAnnotations;
    using DataAnnotationsExtensions;
    using System.Web.Mvc;

    public class Leads
    {
        public int LeadID { get; set; }
        public Guid UserID { get; set; }
        public Guid LastActionBy { get; set; }

        [Display(Name="Contact")]
        public int ContactID { get; set; }

        [Display(Name="Initial Contact Date")]
        [DisplayFormat(DataFormatString = "{0:dd/MM/yyyy}", ApplyFormatInEditMode = true)]
        public DateTime InitialContactDate { get; set; }

        [Display(Name="Contact Type")]
        public string ContactType { get; set; }

        [Display(Name="Notes")]
        public string FreeNotes { get; set; }

        [Display(Name="Lead Status")]
        public int LeadStatusesID { get; set; }

        [Display(Name="Receptive")]
        public int ReceptiveID { get; set; }

        [Required]
        [Display(Name="Company")]
        public int CompanyID { get; set; }

        public string Description { get; set; }

        [Display(Name="Commencement Date")]
        public DateTime CommencementDate { get; set; }

        public string Territory { get; set; }
        public int LeadsReplacementID { get; set; }
        public int LeadRef { get; set; }
        public string Category { get; set; }
        public int InvoicingID { get; set; }
        public bool Guarantee { get; set; }
        
        [Display(Name="Campaign Weeks")]
        [Required]
        [Range(1,1000)]
        public int TotalWeeks { get; set; }

        [Display(Name="Invoice Insurance Limit")]
        public decimal InvoiceInsuranceLimit { get; set; }

        public int ScheduleTemplateID { get; set; }
        public string FeesOther { get; set; }
        public int TradingAddressID { get; set; }
        public int PaymentTermsID { get; set; }
        public int TermConditionsID { get; set; }

        [Display(Name="Call Centre 1")]
        public int CallCentre1ID { get; set; }
        public int? CallCentre2ID { get; set; }
        public int? CallCentre3ID { get; set; }
        public int? CallCentre4ID { get; set; }
        public int? CallCentre5ID { get; set; }

        public string IntRef { get; set; }

        public int? LeadTemplateID { get; set; }

        [Display(Name = "Return Days")]
        public int? ReturnDays { get; set; }

        public bool Combination { get; set; }

        [Display(Name="Credit Based")]
        public bool CreditBased { get; set; }

        [Display(Name="Action Required")]
        public bool ActionRequired { get; set; }

        public bool StreetView { get; set; }
        public bool EPC { get; set; }

        [Display(Name="Dunsmore Pre-check")]
        public bool DunsmorePreCheck { get; set; }

        [Display(Name="New Lead Alert")]
        public bool NewLeadAlert { get; set; }

        [Display(Name="Bullet Points")]
        public string bulletpoint { get; set; }

        [Display(Name="LLN Contact")]
        public int? NotifyEmailID { get; set; }

        public int SectorID { get; set; }

      
        public virtual Companies Company { get; set; }
        public virtual Contacts Contact { get; set; }
        public virtual LeadStatuses LeadStatuses { get; set; }
        public virtual ICollection<Diary> Diaries { get; set; }
        public virtual Users Users { get; set; }
        public virtual ScheduleTemplate ScheduleTemplate { get; set; }
        public virtual ICollection<Fees> Fees { get; set; }
        public virtual Sectors Sector { get; set; }   

    }
}